<div class="gallery-grid">
  <input type="hidden" class="action-pagedata" value="{total:<{$total}>, pagecurrent:<{$page|default:1}>, pagetotal:<{$pagetotal}>}">
  
  <div class="row">
    <{foreach from=$goodsData key=key item=goods}>
	<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">

	<ul class="list-unstyled">
    <li class="add-item item" >
	<{foreach from=$goods.props key=prop_key item=property}>
		<{if $property.name == 'HOT!'}>
			<{if strpos($property.value, "Новинка") !== false}>
				<div class="item-special new">NEW</div>
			<{elseif strpos($property.value, "Хит") !== false}>
				<div class="item-special hit">ХИТ</div>
			<{elseif strpos($property.value, "Сток") !== false}>
				<div class="item-special stock"><i class="icon-best-prices"></i></div>
			<{elseif strpos($property.value, "Резерв") !== false}>
				<div class="item-special reserve">Резерв</div>
			<{/if}>
		<{/if}>
		<{if $property.name == 'Скидка' || $property.name == 'Акция'}>
			<{if $property.value > 0}>
				<div class="item-special sale">-<{$property.value}>%</div>
			<{/if}>
		<{/if}>	
	 <{/foreach}>

      <{assign var='imageset' value=$env.conf.image.image.set}>
      <div class="goods-pic">
          <{if $goods.products.promotion_type_name}>

          <a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=starbuy ctl=site_team act=index arg0=$goods.products.product_id arg1=$goods.products.promotion_type_id}>" class="item-img-link">
          <img src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>"   alt="<{$goods.name}>"></a>
          <!--<img class="action-goods-img" src="" data-src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>" alt="<{$goods.name}>"></a>-->
          <{else}>
          <a  <{if $opentype eq 'new_page'}>target="_blank"<{/if}>  href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>" class="item-img-link">
          <img src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>"   alt="<{$goods.name}>">
          <!--<img class="action-goods-img" data-src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>" alt="<{$goods.name}>">-->
          </a> <!--<{$opentype}>-->
        <{/if}>
        <{if $goods.tags && $gallery_display_tag_goods == 'true'}>
        <{foreach from=$goods.tags item=tags}>
        <{if $tags.params.tag_showOnIndex == 'on'}>
        <{if $tags.params.tag_image}>
        <span class="img-tag-<{$tags.params.pic_loc}>" style="opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><img src="<{$tags.params.tag_image|storager}>"></span>
        <{else}>
        <span class="text-tag-<{$tags.params.pic_loc}>" style="background-color:<{$tags.tag_bgcolor|default:'transparent'}>;color:<{$tags.tag_fgcolor}>;opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><{$tags.tag_name}></span>
        <{/if}>
        <{/if}>
        <{/foreach}>
        <{/if}>
      </div>
	  
	  		<!-- compare and favorite -->
            <div class="trademark_box"><!--<{t}>品牌：<{/t}>--><{t}><{$goods.brand_name}><{/t}></div>
            <div class="text-right compare-fav-wrap">
                <{if $login=='nologin'}>
                <a href="<{link app=b2c ctl=site_passport act=login}>" class=""><span class="glyphicon glyphicon-heart"></span></a> <!--<{t}>收藏<{/t}>-->
                <{else}>
                <{if !$goods.is_fav}>
                <button type="button" class="" rel="_favbtn_" data-gid="<{$goods.goods_id}>"><span class="glyphicon glyphicon-heart"></span></button> <!--<{t}>收藏<{/t}>-->
                <button type="button" class="disabled" rev="_favbtn_" style="display:none;"><span class="glyphicon glyphicon-heart"></span></button> <!--<{t}>已收藏<{/t}>-->
                <{else}>
                <button type="button" class="" rel="_favbtn_" data-gid="<{$goods.goods_id}>" style="display:none;"><span class="glyphicon glyphicon-heart"></span></button> <!--<{t}>收藏<{/t}>-->
                <button type="button" class="disabled" rev="_favbtn_"><span class="glyphicon glyphicon-heart"></span></button> <!--<{t}>已收藏<{/t}>-->
                <{/if}>
                <{/if}>
                <button type="button" class="action-compare" data-compare='{type_id:"<{$goods.type_id}>",goods_id:"<{$goods.goods_id}>",img:"<{$goods.image_default_id|storager:'s'}>",name:"<{$goods.name|strip_tags}>",price:"<{$goods.products.price|cur_odr}>"}'><i class="icon-compare"></i></button> <!--<{t}>比价<{/t}>-->
                <div class="clearfix"></div>
            </div>


		<!--// compare and favorite-->
	
	    <div class="goods-bt">
			<{if !isset($goods.prepare)}>
			  <{if $goods.prepare.promotion_type_name }>
				<div class="item-title">
				  <a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=starbuy ctl=site_team act=index arg0=$goods.products.product_id arg1=$goods.products.promotion_type_id}>"><{$goods.name}></a>
				</div>
				<{else}>
				<div class="item-title"><a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><{$goods.name}></a></div>
			  <{/if}>

			<{/if}>
			 <!--预售商品的显示判断-->
			<{if $goods.prepare.promotion_type == 'prepare'}>
			<div class="item-title"><a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><{$goods.name}></a>&nbsp;<e style="background-color: #ff0000;color:#fff">预售</e></div>
			<{/if}>
		  <!--<div class="goods-desc"><{$goods.brief}></div>-->
	  </div>	
	  <!--<div class="hide">
	  <div class="item-annotation item-annotation-sm item-price small"><{t}>单价：<{/t}> <span><{if $goods.mktprice > 0 }><span class="old-price"><{$goods.mktprice|cur}></span><{/if}><{t}><{$goods.s_price|cur}><{/t}></span></div>
	  </div>-->
	 
		 <div class="item-annotation item-annotation-sm item-price small"><b>За пару от:</b> <span><{if $goods.mktprice > 0 }><span class="old-price"><{$goods.min_mktprice|cur}></span><{/if}><{$goods.min_s_price|cur}></span></div>
	
	  
	  	  <!-- cart and count -->
      <div class="goods-action">
        <!--预售商品的显示判断-->
      <{if !isset($goods.prepare)}>
          
            <{if $goods.products.store > 0}>
            <!-- 加入购物车 -->
            <{if $env.conf.b2c.gallery.display.buynum == 'true'}>
            <span class="p-quantity">
              <a href="javascript:void(0);" class="btn-decrease" >-</a><input type="text" min="1" max="<{$goods.products.store|number}>" size="2" name="goods[num]" class="action-quantity-input form-control input-sm" value="1"><a href="javascript:void(0);" class="btn-increase"  >+</a>
              <{if $env.conf.b2c.gallery.display.store_status == 'true'}>
              <{if $goods.products.store <= $env.conf.b2c.gallery.store_status.num}>
               <!-- <span class="store-warn"><{t}>库存紧张<{/t}></span>/-->
              <{/if}>
              <{/if}>
            </span>
            <input type="hidden" name="goods[goods_id]" value="<{$goods.goods_id}>">
            <input type="hidden" name="goods[product_id]" value="<{$goods.products.product_id}>">
            <{/if}>
            <{if $env.conf.b2c.site.buy.target == '2'}>
            <{assign var='buytarget' value='_blank_cart'}>
            <{elseif $env.conf.b2c.site.buy.target == '3'}>
            <{assign var='buytarget' value='_dialog_minicart'}>
            <{/if}>
          <a class="btn btn-sm btn-primary action-addtocart pull-right" onmousedown="try { rrApi.addToBasket(<{$goods.goods_id}>) } catch(e) {}" href="<{link app=b2c ctl=site_cart act=add arg0=goods arg1=$goods.goods_id arg2=$goods.products.product_id arg3=1}>"<{if $buytarget}> target="<{$buytarget}>"<{/if}>><span><span>
              <i class="iconfont gouwuche1">&#xe607;</i></a> <!--<{t}>加入购物车<{/t}></span></span>-->

            <{elseif $goods.spec_desc && $goods.store}>
            <a class="btn btn-caution" href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><span><span><{t}>查看详情<{/t}></span></span></a>
			<div class="clearfix"></div>
            <{else}>
            <!-- 到货通知 -->
            <a href="javascript:void(0);" class="btn btn-default btn-sm action-notify"  rel="<{$goods.goods_id}>::<{$goods.products.product_id}>"><span><span><{t}>Узнать о наличии<{/t}></span></span></a><!--到货通知-->

            <{/if}>
       
           <{else}>
        <!--预售商品-->
          <div class="goods-buy" style="margin-left:0px;">

            <!-- 加入购物车 -->
            <span class="p-quantity" >
              <input type="text" min="1" readonly="true" max="<{$goods.products.store|number}>" size="2" name="goods[num]" class="action-quantity-input" value="1">

            </span>
            <input type="hidden" name="goods[goods_id]" value="<{$goods.goods_id}>">
            <input type="hidden" name="goods[product_id]" value="<{$goods.products.product_id}>">


            <a class="btn btn-major"  href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><span><span><{t}>立即预定<{/t}></span></span></a>

          </div>
        <{/if}>
        </div>
	<!--// cart and count -->
	  <div class="grid-item-hidden">
		   <div class="item-annotation item-annotation-sm item-vendor-code small"><{t}>Артикул:<{/t}> <b><{t}><{$goods.bn}><{/t}></b></div>
		<!--<div class="hide">
		 <div class="item-annotation item-annotation-sm item-price item-price-per-box small" data-price="<{$goods.price}>"><{t}>包装价：<{/t}> <span><{t}><{$goods.price|cur}><{/t}></span></div>
		</div>-->
		
		<div class="item-annotation item-annotation-sm item-price item-price-per-box small" data-price="<{$goods.min_price}>"><b>За короб от:</b> <span><{$goods.min_price|cur}></span></div>
	
		  
          <div class="item-annotation item-annotation-sm item-count small"><{t}>每包装数量：<{/t}> <b><{t}><{$goods.unit_num}><{/t}></b></div>
		<div class="table-responsive">
		<p class="small">Пар в упаковке:</p>
			<table class="table table-hover table-striped table-condensed table-bordered">
				<{foreach from=$goods.params key=key item=item}>
						<thead>
							<tr class="small">
								<{foreach from=$item key=key2 item=item2}>
										<{if !empty($item2) && $item2 > 0 && $key2 != "Кол-во в упаковке" }>
											<th><{$key2}></th>
										<{/if}>	
								<{/foreach}>
							</tr>
						</thead>
						<tbody>
							<tr class="small">
								<{foreach from=$item key=key2 item=item2}>
										<{if !empty($item2) && $item2 > 0 && $key2 != "Кол-во в упаковке" }>
											<td><{$item2}></td>
										<{/if}>	
								<{/foreach}>
							</tr>
						</tbody> 
				<{/foreach}>	
			</table>
		</div>

      </div>
	  <!--<{foreach from=$goods.props item=props}>
	  <div  class="goods-desc"><{t}><{$props.name}>：<{/t}><{t}><{$props.value}><{/t}></div>
      <{/foreach}>-->
       <!--<div class="goods-price">
          <ins class="price"><{$goods.products.price|cur_odr}></ins>
          <{if $point_status == 'on'}>
          <{if $goods.comments_count > 0}>
          <{if $commentListListnum=='true'}>
          <span class="goods-comment"><a href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>#product_comment"><b><{$goods.comments_count}></b><{t}>条评论<{/t}></a></span>
          <{/if}>
          <{else}>
          <{if $commentListListnum=='true'}>
          <span class="goods-comment"><{t}>暂无评论<{/t}></span>
          <{/if}>
          <{/if}>
          <{/if}>
          <{if $env.conf.b2c.site.show_mark_price == 'true'}>
           
           <del class="price"><{$goods.products.mktprice|cur_odr}></del>
          <{/if}>
        </div>-->


		  
      <div class="promotion-tags">
        <{if $goods.promotion_tags && $env.conf.b2c.gallery.display.promotion == 'true'}>
        <{foreach from=$goods.promotion_tags item=pTag}>
        <span class="tag"><{$pTag.tag_name}></span>
        <{/foreach}>
        <{/if}>
		<{if $goods.products.promotion_type_name }>
        <span class="tag"><{$goods.products.promotion_type_name}></span>
        <{/if}>

      </div>




		
      </div>
    </li>
	</ul>
    <{/foreach}>
  </div>
</div>
<{pagers data=$pager}>
